import request from '@/utils/request'

/* 新增部门*/
export function saveDept(data) {
  return request({
    url: '/system/dept/saveDept',
    method: 'post',
    data: data
  })
}

/* 修改部门*/
export function updateDept(data) {
  return request({
    url: '/system/dept/updateDeptById',
    method: 'post',
    data: data
  })
}

/* 根据id查询部门*/
export function selectDeptById(data) {
  return request({
    url: '/system/dept/selectDeptById/' + data,
    method: 'post'
  })
}

/* 删除部门*/
export function deleteDept(data) {
  return request({
    url: '/system/dept/deleteDept',
    method: 'post',
    data: data
  })
}

/* 查询部门树结构*/
export function selectDeptTree(data) {
  return request({
    url: '/system/dept/selectDeptTree',
    method: 'post',
    data: data
  })
}

/* 查询部门树结构*/
export function selectAllDeptTree(data) {
  return request({
    url: '/system/dept/selectAll',
    method: 'post',
    data: data
  })
}
